<?php
/*
Plugin Name: Flickr Widget Admin
Plugin URI: http://127.0.0.1
Description: A brief description of the Plugin.
Version: The Plugin's Version Number, e.g.: 1.0
Author: Name Of The Plugin Author
Author URI: http://URI_Of_The_Plugin_Author
License: A "Slug" license name e.g. GPL2
*/

/*  Copyright YEAR  PLUGIN_AUTHOR_NAME  (email : PLUGIN AUTHOR EMAIL)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License, version 2, as 
    published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

add_action('admin_menu', 'flickr_widget_menu');
add_action('admin_enqueue_scripts', 'header_scripts');

 

function flickr_widget_menu() {
	add_options_page('Flickr Widget Album Creator', 'Flickr Album', 'manage_options', 'my-unique-identifier', 'my_plugin_options');
}

function header_scripts(){?>
	<link rel="stylesheet" type="text/css" href="<?php echo WP_PLUGIN_URL; ?>/js/yui/docs/assets/dd/photos/photos.css">   
	<link rel="stylesheet" type="text/css" href="<?php echo WP_PLUGIN_URL; ?>/flickr_image_widget/css/photos_override.css">   

	<script src="<?php echo WP_PLUGIN_URL; ?>/js/yui/build/yui/yui-min.js"></script>
	
	<?php 	
}

function my_plugin_options() {
	global $wpdb;	
	if (!current_user_can('manage_options'))  {
		wp_die( __('You do not have sufficient permissions to access this page.') );
	}
	?>

	
	<div class="wrap">
		<div class="yui-b" style="float: left;width: 20%;">
			<form action="ajax.php" method="post" name="frm_new_album" id="frm_new_album">
				<input type="text" 
				<button class="btn" id="btn_new_album" onclick="new_album();">New Album</button>
			</form>
            <ul id="photoList">
                <li class="all selected"><a href="#">All Photos</a></li>
                <li id="a_1"><a href="#">Album #1<span>(0)</span></a></li>
                <li id="a_2"><a href="#">Album #2<span>(0)</span></a></li>

                <li id="a_3"><a href="#">Album #3<span>(0)</span></a></li>
                <li id="a_4"><a href="#">Album #4<span>(0)</span></a></li>
            </ul>
            <p>Click and drag a photo to an album above. You can also Shift + Click to select and drag multiple photos.</p>
            <p>Click on an album to view the photos that you added.</p>
            <p>You can also use the slider at the bottom to adjust the size of the image to help fit them on your screen.</p>
        </div>
		<div id="doc3" class="yui-t1" style="width:80%;">
		    <div id="bd">
		        <div id="yui-main">
			        <div class="yui-b">
		                <div class="yui-g">
		                    <ul>
		                    </ul>
			            </div>
		            </div>
			    </div>
		    </div>
		    <div id="ft" class="loading"><strong></strong><div class="horiz_slider"></div><em></em></div>
		</div>
	</div>
	<script src="<?php echo WP_PLUGIN_URL; ?>/flickr_image_widget/js/flickr_view.js"></script> 
	<?php
}
?>